[DO NOT MERGE / INCOMPLETE] staking-async: improve benchmarking / testing benchmark time#10822
[DO NOT MERGE / INCOMPLETE] staking-async: improve benchmarking / testing benchmark time#10822
Conversation
|
/cmd bench --pallet pallet_staking_async --runtime asset-hub-westend |
|
Command "bench --pallet pallet_staking_async --runtime asset-hub-westend" has started 🚀 See logs here |
…t_staking_async --runtime asset-hub-westend'
|
Command "bench --pallet pallet_staking_async --runtime asset-hub-westend" has finished ✅ See logs here DetailsSubweight results:
Command output:✅ Successful benchmarks of runtimes/pallets: |
Fixes timing leaks in benchmarks with large setup operations (e.g., clearing 27k staking entries). After bulk deletions are committed, the first new allocation can trigger memory allocator overhead that leaks into benchmark timing. The fix adds a memory allocator warmup step in `commit_db()` that performs a dummy write/clear cycle to absorb this overhead before timing starts. Fix #10798. Another related issue: #10813 (rework of staking benchmarks to avoid massive bulk deletion if not needed. An example showing the validity of the approach [here](#10822 (comment)) where we just remove a clear_validators_and_nominators() from one benchmark and that's enough to go down from ms to microsec) --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
/cmd bench --pallet pallet_staking_async --runtime asset-hub-westend |
|
Command "bench --pallet pallet_staking_async --runtime asset-hub-westend" has started 🚀 See logs here |
|
All GitHub workflows were cancelled due to failure one of the required jobs. |
|
Command "bench --pallet pallet_staking_async --runtime asset-hub-westend" has finished ✅ See logs here DetailsSubweight results:No changes found. Command output:❌ Failed benchmarks of runtimes/pallets: |
|
Not needed for the time being - after the main issue with benchmark tool has been fixed. |
Remove redundant clear_validators_and_nominators calls from individual benchmarks
Related issue: #10813